package com.yun.controller;

import com.fasterxml.jackson.databind.util.JSONPObject;
import org.springframework.web.bind.annotation.*;

/**
 * @author: Mr.Liu
 * @version: 1.0.0
 * @description:
 * @create: 2022-05-24 17:45
 * @modify: 2022-05-24 17:45
 **/
@RestController
@RequestMapping("/provider/service")
public class HelloController {
    /**
     * 从请求路径获取值，需要使用@PathVariable注解
     */
    @GetMapping("/helloWorld/{msg}")
    public String helloWorld(@PathVariable("msg") String msg){
        System.out.println(msg);
        return "传入的值:" + msg;
    }

    @PostMapping("/insertUser")
    public String insertUser(@RequestBody String str) {
        return "POST";
    }
}
